<!DOCTYPE html>
<html lang="en">
<title>运营位管理</title>
<#import "/layout/layout.html" as body/>
<@body.page>

<div class="wrapper wrapper-content animated fadeIn">
    <div class="tabs-container">
        <ul class="nav nav-tabs">
            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">图片</a></li>
            <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">视频列表</a></li>
            <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">文章</a></li>
        </ul>
        <div class="tab-content">
            <!--轮播图-->
            <div id="tab-1" class="tab-pane active">
                <div class="panel-body">
                    <div class="wrapper wrapper-content animated fadeInRight">

                        <!--v-for-->
                        <div class="row margin-top">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-title">
                                        <h4 class="pull-left">首页轮播图</h4>
                                        <a href="add?mainType=1&subType=1" class="btn btn-primary btn-sm pull-right">添加首页轮播</a>
                                    </div>
                                    <div class="ibox-content is-drag">
                                        <div class="table-responsive">
                                            <table class="table table-center">
                                                <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>轮播图</th>
                                                    <th>轮播标题</th>
                                                    <th>链接</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody id="list_home_banner">
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="ibox-footer overflow">
                                        <button type="button" onclick="sort('list_home_banner')" class="btn btn-success pull-right">确定修改排序</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--v-for end-->

                        <div class="row margin-top">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-title">
                                        <h4 class="pull-left">檬店轮播图</h4>
                                        <a href="add?mainType=1&subType=2" class="btn btn-primary btn-sm pull-right">添加檬店轮播</a>
                                    </div>
                                    <div class="ibox-content is-drag">
                                        <div class="table-responsive">
                                            <table class="table table-center">
                                                <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>轮播图</th>
                                                    <th>轮播标题</th>
                                                    <th>链接</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody id="list_store">

                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="ibox-footer overflow">
                                        <button type="button" onclick="sort('list_store')" class="btn btn-success pull-right">确定修改排序</button>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <div class="row margin-top">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-title">
                                        <h4 class="pull-left">私教推荐活动图</h4>
                                        <a href="add?mainType=1&subType=3" class="btn btn-primary btn-sm pull-right">添加私教活动</a>
                                    </div>
                                    <div class="ibox-content is-drag">
                                        <div class="table-responsive">
                                            <table class="table table-center">
                                                <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>轮播图</th>
                                                    <th>轮播标题</th>
                                                    <th>链接</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody id="list_private_recommend">

                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="ibox-footer overflow">
                                        <button type="button" onclick="sort('list_private_recommend')" class="btn btn-success pull-right">确定修改排序</button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!--<div class="row margin-top">-->
                            <!--<div class="col-lg-12">-->
                                <!--<div class="ibox float-e-margins">-->
                                    <!--<div class="ibox-title">-->
                                        <!--<h4 class="pull-left">会员轮播图</h4>-->
                                        <!--<a href="add?type=3" class="btn btn-primary btn-sm pull-right">添加轮播</a>-->
                                    <!--</div>-->
                                    <!--<div class="ibox-content is-drag">-->
                                        <!--<div class="table-responsive">-->
                                            <!--<table class="table table-center">-->
                                                <!--<thead>-->
                                                <!--<tr>-->
                                                    <!--<th>序号</th>-->
                                                    <!--<th>轮播图</th>-->
                                                    <!--<th>轮播标题</th>-->
                                                    <!--<th>链接</th>-->
                                                    <!--<th>操作</th>-->
                                                <!--</tr>-->
                                                <!--</thead>-->
                                                <!--<tbody id="list_vip">-->

                                                <!--</tbody>-->
                                            <!--</table>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="ibox-footer overflow">-->
                                        <!--<button type="button" id="mengdian_fbww2" class="btn btn-success pull-right">确定修改排序</button>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->


                        <!--<div class="row margin-top">-->
                            <!--<div class="col-lg-12">-->
                                <!--<div class="ibox float-e-margins">-->
                                    <!--<div class="ibox-title">-->
                                        <!--<h4 class="pull-left">首页推荐</h4>-->
                                        <!--<a href="add?type=3" class="btn btn-primary btn-sm pull-right">添加首页推荐</a>-->
                                    <!--</div>-->
                                    <!--<div class="ibox-content is-drag">-->
                                        <!--<div class="table-responsive">-->
                                            <!--<table class="table table-center">-->
                                                <!--<thead>-->
                                                <!--<tr>-->
                                                    <!--<th>序号</th>-->
                                                    <!--<th>轮播图</th>-->
                                                    <!--<th>轮播标题</th>-->
                                                    <!--<th>链接</th>-->
                                                    <!--<th>操作</th>-->
                                                <!--</tr>-->
                                                <!--</thead>-->
                                                <!--<tbody id="list_home_recommend">-->

                                                <!--</tbody>-->
                                            <!--</table>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="ibox-footer overflow">-->
                                        <!--<button type="button" id="mengdian_fbww3" class="btn btn-success pull-right">确定修改排序</button>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->

                    </div>
                </div>
            </div>

            <!--视频列表页-->
            <div id="tab-2" class="tab-pane">
                <div class="panel-body">
                    <div class="wrapper wrapper-content animated fadeInRight">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-title">
                                        <h4 class="pull-left">视频列表页(默认前两位为首页推荐视频)</h4>
                                        <a href="add?mainType=2&subType=1" class="btn btn-primary btn-sm pull-right">添加新视频</a>
                                    </div>
                                    <div class="ibox-content is-drag">
                                        <div class="table-responsive">
                                            <table class="table table-center">
                                                <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>标题</th>
                                                    <th>教练</th>
                                                    <th>视频时长</th>
                                                    <th>视频标签</th>
                                                    <th>视频链接</th>
                                                    <th>视频类别</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody id="video_list">
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="ibox-content col-lg-12">
                                        <button type="button" onclick="sort('video_list')"  class="btn btn-success pull-right">确定修改排序</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!--文章-->
            <div id="tab-3" class="tab-pane">

                <div class="panel-body">
                    <div class="wrapper wrapper-content animated fadeInRight">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-title">
                                        <h4 class="pull-left">普通文章</h4>
                                        <a href="add?mainType=3&subType=1" class="btn btn-primary btn-sm pull-right">添加文章</a>
                                    </div>
                                    <div class="ibox-content is-drag">
                                        <div class="table-responsive">
                                            <table class="table table-center">
                                                <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>文章ID</th>
                                                    <th>文章标题</th>
                                                    <th>作者</th>
                                                    <th>文章链接</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody id="article_nor_list"></tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="ibox-footer overflow">
                                        <button type="button" onclick="sort('article_nor_list')" class="btn btn-success pull-right">确定修改排序</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="wrapper wrapper-content animated fadeInRight">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-title">
                                        <h4 class="pull-left">推荐教练</h4>
                                        <a href="add?mainType=3&subType=2" class="btn btn-primary btn-sm pull-right">添加推荐教练</a>
                                    </div>
                                    <div class="ibox-content is-drag">
                                        <div class="table-responsive">
                                            <table class="table table-center">
                                                <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>文章ID</th>
                                                    <th>文章标题</th>
                                                    <th>作者</th>
                                                    <th>文章链接</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody id="article_coach_list"></tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="ibox-footer overflow">
                                        <button type="button" onclick="sort('article_coach_list')" class="btn btn-success pull-right">确定修改排序</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="wrapper wrapper-content animated fadeInRight">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-title">
                                        <h4 class="pull-left">首页通知</h4>
                                        <a href="add?mainType=3&subType=3" class="btn btn-primary btn-sm pull-right">添加首页通知</a>
                                    </div>
                                    <div class="ibox-content is-drag">
                                        <div class="table-responsive">
                                            <table class="table table-center">
                                                <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>通知ID</th>
                                                    <th>文章标题</th>
                                                    <th>副标题</th>
                                                    <th>描述</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody id="article_notice_list"></tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="ibox-footer overflow">
                                        <button type="button" onclick="sort('article_notice_list')" class="btn btn-success pull-right">确定修改排序</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

            </div>

        </div>
    </div>
</div>

<script>

    function getarg(url) {
        var arg = url.split("#");
        return arg[1];
    }

    $(function () {

        var _url = getarg(window.location.href);
        $('.nav-tabs a[href="#' + _url + '"]').tab('show');

        $(".is-drag").sortable({
            cursor: "move",
            items: ".is-drag-li",               //只是li可以拖动
            opacity: 0.6,                       //拖动时，透明度为0.6
            revert: false,                       //释放时，增加动画
            update: function (event, ui) {       //更新排序之后
                console.log($(this).sortable("toArray"));
            }
        });

        // 视频列表页
//        $.ajax({
//            url: "${baseUrl}/system/operative/video_list",
//            type: "POST",
//            success: function (result) {
//                $("#video_list").empty();
//                var html = "";
//                $.each(result.video_list, function (i, result) {
//                    html += "<tr class='is-drag-li'>";
//                    html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
//                    html += "<td>" + result.title + "</td>";
//                    html += "<td>" + result.coachName + "</td>";
//                    html += "<td>" + result.duration + "</td>";
//                    html += "<td>" + result.lable + "</td>";
//                    html += "<td><a target='_blank' href='" + result.videoLink + "'>点击查看</a></td>";
//                    html += "<td>" + result.videoClass + "</td>";
//                    html += "<td>";
//                    html += "<button type='button' onclick='to_video_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑<tton>";
//                    html += "<button type='button' onclick='delete_video(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除<tton>";
//                    html += "</td></tr>";
//                });
//                $("#video_list").html(html);
//            }
//        });

        // 视频列表页 排序
        $("#splby_fbww").click(function () {
            var sort_string = "";
            $("#video_list").find("td").each(function () {
                var val = $(this).attr("id");
                sort_string = sort_string + "##" + val;
            });
            $.ajax({
                url: "${baseUrl}/system/operative/sort_home_figure",
                data: "sort_string=" + sort_string,
                type: "POST",
                success: function (result) {
                    swal("排序成功!", '', 'success');
                    video_list();
                }
            });
        });

        // 文章
//        $.ajax({
//            url: "${baseUrl}/system/operative/articlescrap_list",
//            type: "POST",
//            success: function (result) {
//                $("#articlescrap_list").empty();
//                var html = "";
//                $.each(result.articlescrap_list, function (i, result) {
//                    html += "<tr class='is-drag-li'>";
//                    html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
//                    html += "<td>" + (result.id) + "</td>";
//                    html += "<td>" + result.title + "</td>";
//                    html += "<td>" + result.authorName + "</td>";
//                    html += "<td><a target='_blank' href='" + result.link + "'>点击查看</a></td>";
//                    html += "<td>";
//                    html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
//                    html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
//                    html += "</td></tr>";
//                });
//                $("#articlescrap_list").html(html);
//            }
//        });
        //读取资源
        load_data();

    });


    /**
     * 资源排序
     * @param id listId
     * @author blank 2017/8/3 下午4:38
     */
    function sort(id) {
        var sort_string = "";
        $("#"+ id +"").find("td").each(function () {
            var val = $(this).attr("id");
            sort_string = sort_string + "##" + val;
        });
        $.ajax({
            url: "sort",
            data: "sortString=" + sort_string,
            type: "POST",
            success: function (result) {
                if (result) {
                    swal({
                        title:"排序修改成功!",
                        timer:1000
                    }).then(
                        function () {},
                        // handling the promise rejection
                        function (dismiss) {
                            if (dismiss === 'timer') {
                                console.log('I was closed by the timer')
                            }
                        }
                    );
                    load_data();
                }
            }
        });
    }

    /**
     * 编辑资源
     *
     * @param id 资源 ID
     * @author blank 2017/7/31 下午8:19
     */
    function articlescrap_edit(id) {
        window.location =  "add?id=" + id
    }

    /**
     * 删除资源
     *
     * @param id 资源 ID
     * @author blank 2017/8/3 下午3:26
     */
    function delete_article(id) {

        swal({
            title: "确定要删除吗?",
            text: "删除后不可恢复!",
            type: "question",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            cancelButtonText: "容我三思！",
            confirmButtonText: "删除!"
        }).then(function () {
            $.post("del", {id: id}, function (result) {
                if (result) {
                    swal("删除成功!", "页面即将重新加载,请稍后...", "success");
                    window.setTimeout(function () {
                        window.location.reload()
                    }, 1000);
                }
            });
        },function () {
        });
    }

    /**
     * 读取数据
     *
     * @author blank 2017/7/17 上午9:59
     */
    function load_data() {
        //图片数据
        $.getJSON("${baseUrl}system/indexResource/page?mainType=1", function(result) {
            if (result) {
                //首页轮播
                var html = "";
                if (result.data.list.listHomeBanner) {

                    $.each(result.data.list.listHomeBanner, function (i, result) {
                        html += "<tr class='is-drag-li'>";
                        html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
                        html += "<td><img class='img-responsive banner-img' width='200' src=' "+ result.imgUrl +" ' alt='img'></td>";
                        html += "<td>" + result.title + "</td>";
                        html += "<td>" + result.link +"<br>" +
                            "<a target='_blank' href='" + result.link + "'>点击查看</a>" + "</td>";
                        html += "<td>";
                        html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
                        html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
                        html += "</td></tr>";
                    });
                    $("#list_home_banner").html(html);
                }

                //檬店
                html = "";
                if (result.data.list.listStore) {

                    $.each(result.data.list.listStore, function (i, result) {
                        html += "<tr class='is-drag-li'>";
                        html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
                        html += "<td><img class='img-responsive banner-img' width='200' src=' " + result.imgUrl + " ' alt='img'></td>";
                        html += "<td>" + result.title + "</td>";
                        html += "<td>" + result.link +"<br>" +
                            "<a target='_blank' href='" + result.link + "'>点击查看</a>" + "</td>";
                        html += "<td>";
                        html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
                        html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
                        html += "</td></tr>";
                    });
                    $("#list_store").html(html);
                }

                //私教活动推荐图
                html = "";
                if (result.data.list.listPrivateRecommend) {

                    $.each(result.data.list.listPrivateRecommend, function (i, result) {
                        html += "<tr class='is-drag-li'>";
                        html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
                        html += "<td><img class='img-responsive banner-img' width='200' src=' " + result.imgUrl + " ' alt='img'></td>";
                        html += "<td>" + result.title + "</td>";
                        html += "<td><spna style='width: 300px;display: inline-block;overflow:hidden;'>" + result.link +"</spna><br>" +
                            "<a target='_blank' href='" + result.link + "'>点击查看</a>" + "</td>";
                        html += "<td>";
                        html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
                        html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
                        html += "</td></tr>";
                    });
                    $("#list_private_recommend").html(html);
                }

//                //会员
//                html = "";
//                $.each(result.data.list.listVip, function (i, result) {
//                    html += "<tr class='is-drag-li'>";
//                    html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
//                    html += "<td><img class='img-responsive banner-img' width='200' src=' " + result.imgUrl + " ' alt='img'></td>";
//                    html += "<td>" + result.title + "</td>";
//                    html += "<td>" + result.link +"<br>" +
//                        "<a target='_blank' href='" + result.link + "'>点击查看</a>" + "</td>";
//                    html += "<td>";
//                    html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
//                    html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
//                    html += "</td></tr>";
//                });
//                $("#list_vip").html(html);

//
//                //首页推荐
//                html = "";
//                $.each(result.data.list.listHomeRecommend, function (i, result) {
//                    html += "<tr class='is-drag-li'>";
//                    html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
//                    html += "<td><img class='img-responsive banner-img' width='200' src=' " + result.imgUrl + " ' alt='img'></td>";
//                    html += "<td>" + result.title + "</td>";
//                    html += "<td>" + result.link +"<br>" +
//                        "<a target='_blank' href='" + result.link + "'>点击查看</a>" + "</td>";
//                    html += "<td>";
//                    html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
//                    html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
//                    html += "</td></tr>";
//                });
//                $("#list_home_recommend").html(html);

            }
        });

        //文章
        $.getJSON("${baseUrl}system/indexResource/page?mainType=3", function(result) {
            if (result) {

                //文章-普通文章
                var html = "";
                if (result.data.list.listArticleNor) {

                    $.each(result.data.list.listArticleNor, function (i, result) {
                        html += "<tr class='is-drag-li'>";
                        html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
                        html += "<td>" + result.id + "</td>";
                        html += "<td>" + result.title + "</td>";
                        html += "<td>" + result.coachNickName + "</td>";
                        html += "<td>" + result.link + "<br>" +
                            "<a target='_blank' href='" + result.link + "'>点击查看</a>" + "</td>";
                        html += "<td>";
                        html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
                        html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
                        html += "</td></tr>";
                    });
                    $("#article_nor_list").html(html);
                }



                //文章-推荐教练列表
                html = "";
                if (result.data.list.listArticleCoach) {

                    $.each(result.data.list.listArticleCoach, function (i, result) {

                        html += "<tr class='is-drag-li'>";
                        html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
                        html += "<td>" + result.id + "</td>";
                        html += "<td>" + result.title + "</td>";
                        html += "<td>" + result.coachNickName + "</td>";
                        html += "<td>" + result.link + "<br>" +
                            "<a target='_blank' href='" + result.link + "'>点击查看</a>" + "</td>";
                        html += "<td>";
                        html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
                        html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
                        html += "</td></tr>";
                    });
                    $("#article_coach_list").html(html);
                }

                //文章-首页通知
                html = "";
                if (result.data.list.listArticleNotice) {

                    $.each(result.data.list.listArticleNotice, function (i, result) {
                        html += "<tr class='is-drag-li'>";
                        html += "<td id='hf_" + result.id + "_" + (i + 1) + "'>" + (i + 1) + "</td>";
                        html += "<td>" + result.id + "</td>";
                        html += "<td>" + result.title + "</td>";
                        html += "<td>" + result.subTitle + "</td>";
                        html += "<td>" + result.desc + "</td>";
                        html += "<td>";
                        html += "<button type='button' onclick='articlescrap_edit(" + result.id + ")' class='btn btn-default'><i class='fa fa-edit'></i> 编辑</button>";
                        html += "<button type='button' onclick='delete_article(" + result.id + ")' class='btn btn-default btn-delete'><i class='fa fa-ban'></i> 删除</button>";
                        html += "</td></tr>";
                    });
                    $("#article_notice_list").html(html);
                }
            }
        });

    }
</script>

</@body.page>
</html>